<?php
/**
 * File:          KValidator_Parameter_Text_Regex
 * Description:   -
 * Author:        Kovac "Kovacou'" Alexandre (www.kovacou.fr)
 * Last Update:   21/04/2011
 */

   class KValidator_Parameter_Text_Regex implements KValidatorParameter {
      public  $pattern,
              $return,
              $error;
      
      public function valid ($value, $config) {
         if (preg_match('#^' . $this->pattern .'$#', $value) != $this->return)
            return $this->error;
      }
   }
 
/**
 * End
 * Of
 * File
 */
?>